package main

import "fmt"

func main() {
	var myMap1 map[string]string
	if myMap1 == nil {
		fmt.Println("my map is null")
	}

	//在使用map钱需要使用make进行分配空间
	myMap1 = make(map[string]string, 10)

	myMap1["one"] = "java"
	myMap1["two"] = "c++"
	myMap1["three"] = "python"
	fmt.Println(myMap1)

	myMap2 := make(map[int]string)
	myMap2[0] = "111"
	myMap2[1] = "112"
	myMap2[2] = "113"
	fmt.Println(myMap2)

	myMap3 := map[int]int{
		0: 1,
		1: 2,
		2: 3,
	}
	fmt.Println(myMap3)

}
